//
//  MusicCollectionViewCell.m
//  MoodDiary
//
//  Created by X on 2022/1/24.
//

#import "MusicCollectionViewCell.h"

@implementation MusicCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KW(156), KW(180))];
        self.backView.backgroundColor = [UIColor whiteColor];
        self.backView.layer.cornerRadius = KW(10);
        self.backView.layer.borderColor = COLOR(232, 232, 232, 1).CGColor;
        self.backView.layer.borderWidth = 1;
        [self.contentView addSubview:self.backView];
        
        self.imageV = [[BasicDownloadImgView alloc] initWithFrame:CGRectMake((self.frame.size.width-KW(80))/2, KW(28),KW(80), KW(80))];
        self.imageV.placeholderImageName=@"分类列表默认图";
        self.imageV.strType=@"model";
        self.imageV.image = [UIImage imageNamed:@"分类列表默认图"];
        self.imageV.clipsToBounds =YES;
        self.imageV.layer.cornerRadius = KW(40);
        self.imageV.userInteractionEnabled=YES;
        [self.contentView addSubview:self.imageV];
        
        self.imagePlay = [[UIImageView alloc] initWithFrame:CGRectMake((KW(80)-KW(24))/2, (KW(80)-KW(24))/2,KW(24), KW(24))];
        self.imagePlay.image = [UIImage imageNamed:@"开始播放"];
        [self.imageV addSubview:self.imagePlay];
        
        self.name = [[UILabel alloc] initWithFrame:CGRectMake(0,KW(128), self.frame.size.width, KW(25))];
        self.name.font = [UIFont systemFontOfSize:KW(16)];
        self.name.textColor=[UIColor blackColor];
        self.name.textAlignment = NSTextAlignmentCenter;
        self.name.text=@"2323";
        [self.contentView addSubview:self.name];
    }
    return self;
}

@end
